import * as types from "../types/wish.types";

const initialState = {
  wish: [],
};

export default function wishReducer(state = initialState, action) {
  switch (action.type) {
    // 将商品加入心愿单
    case types.ADD_GOODS_TO_WISH:
      return {
        ...state,
        wish: [...state.wish, action.payload],
      };
    default:
      return state;
  }
}
